FROM maven:3.5.4-jdk-8

WORKDIR /app
#COPY ./src ./src
#COPY pom.xml ./
COPY target/dockerCI-0.0.1-SNAPSHOT.jar ./

#RUN mvn package -Dmaven.test.skip=true && cp -f target/dockerCI-0.0.1-SNAPSHOT.jar /app

EXPOSE 8080

ENV JVM_OPTS "\
    -Xmx256M \
    -Xms256M \
    -XX:+HeapDumpOnOutOfMemoryError"

#ENTRYPOINT java $JVM_OPTS -jar /app/dockerCI-0.0.1-SNAPSHOT.jar

ENTRYPOINT ["nohup", "java","-jar"]

# 默认ENTRYPOINT参数用法 docker run 后面可以使用自定义参数进行覆盖
CMD ["/app/dockerCI-0.0.1-SNAPSHOT.jar","&"]
